In this document, we’ll be recreating the visualization from the book using tableau. We will be using the data we created earlier during the R visualization with the already merged data sets.
To begin, open Tableau desktop.
Then we will want to connect to our data set. On the left-hand side there is a blue panel with options for different kinds of data - recall that our file is an RData file, so select the option for “Statistical File”. This should allow you to select the correct file from your computer. (If you didn’t rename the file from the R tutorial, it’ll be called “allCtryData.RData”.)
Once you click the correct data set, a display similar to the figure below should appear.
Finally, in the bottom left corner there is a button labeled “Sheet 1”. Click this, and then we’re ready to begin creating our visualization!
To begin, along the left-hand side there are two sections labeled “Dimensions” and “Measures”. Click and drag “Country” from the Dimensions section to the center of the sheet into the large space labeled “Drop Field Here”.
This should automatically create a map with dots overlayed on the countries in our data set.
Then edit our dots to reflect the infant mortality and population size, we will first drag and drop the population variable onto the “Size” button under the “Marks” section. This will scale the circles by population size. Then we’ll drag and drop the Infant Mortality variable onto the “Color” button under “Marks”.
Thus, we’ve recreated the visualization from the R tutorial.
Finally, we’ll need to edit the titles from the default settings to more clearly reflect our data.
To change them, we will click the drop-down arrow in the upper right corner of the label, and select “Edit Title”. We can then change the title to anything we wish.
Then we can repeat this process with any other titles we wish to change. Then we have our final visualization.